<?php
include("dao/DatabaseDAO.php");
include("Security.php");

Security::checkAuthenticated();

$database = Array(
    "URL" => $_POST["databaseUrl"],
    "DatabaseName" => $_POST["databaseName"],
    "User" => $_POST["databaseUser"],
    "Password" => $_POST["databasePassword"],
);

$databaseDAO = new DatabaseDAO();
echo $databaseDAO->checkConnection($database);
?>